package com.example.demo.entity;

import java.io.Serializable;
import java.util.Objects;

public class Food implements Serializable {
    private Integer fid;
    private String fname;
    private String ftype;
    private String fstatus;
    private Integer fcount;

    public Food(Integer fid, String fname, String ftype, String fstatus, Integer fcount) {
        this.fid = fid;
        this.fname = fname;
        this.ftype = ftype;
        this.fstatus = fstatus;
        this.fcount = fcount;
    }

    public Food() {
    }

    public Integer getFid() {
        return fid;
    }

    public void setFid(Integer fid) {
        this.fid = fid;
    }

    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    public String getFtype() {
        return ftype;
    }

    public void setFtype(String ftype) {
        this.ftype = ftype;
    }

    public String getFstatus() {
        return fstatus;
    }

    public void setFstatus(String fstatus) {
        this.fstatus = fstatus;
    }

    public Integer getFcount() {
        return fcount;
    }

    public void setFcount(Integer fcount) {
        this.fcount = fcount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Food food = (Food) o;
        return Objects.equals(fid, food.fid) && Objects.equals(fname, food.fname) && Objects.equals(ftype, food.ftype) && Objects.equals(fstatus, food.fstatus) && Objects.equals(fcount, food.fcount);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fid, fname, ftype, fstatus, fcount);
    }

    @Override
    public String toString() {
        return "Food{" +
                "fid=" + fid +
                ", fname='" + fname + '\'' +
                ", ftype='" + ftype + '\'' +
                ", fstatus='" + fstatus + '\'' +
                ", fcount=" + fcount +
                '}';
    }
}
